
/*
cd "[insert filepath here]" // NOTE: User should enter file path here
*/

log using knobe_log, replace

clear

use S2_mturk_stata12.dta



*********************************Replication for Main Paper

**Figure 1

reg dv_intend6 t_negframe
estimates store a
reg dv_intend6 t_negframe if t_unesco ==0 & t_severity == 0
estimates store b
reg dv_intend6 t_negframe if t_unesco ==0 & t_severity == 1
estimates store c
reg dv_intend6 t_negframe if t_unesco ==1 & t_severity == 0
estimates store d
reg dv_intend6 t_negframe if t_unesco == 1 & t_severity == 1
estimates store e

coefplot ///
 (a, label ("All Scenarios, N=783") msymbol(square) msize(vlarge) color(black) ciopts(recast(rcap) color(black)) ) ///
 (b, label ("Civilian-Low, N=194") msymbol(square) msize(vlarge) mfcolor(white) color(cranberry) ciopts(recast(rcap) color(cranberry)) ) ///
 (c, label ("Civilian-High, N=193") msymbol(square) msize(vlarge)  color(cranberry) ciopts(recast(rcap) color(cranberry)) ) ///
 (d, label ("UNESCO-Low, N=194") msymbol(square) msize(vlarge) mfcolor(white) color(navy) ciopts(recast(rcap) color(navy)) ) ///
 (e, label ("UNESCO-High, N=202") msymbol(square) msize(vlarge) color(navy) ciopts(recast(rcap) color(navy)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
ylab( , labsize(medlarge) ) yscale(off) ///
xtitle( "Effect on Intentionality Evaluation", size (large) margin(medlarge)) ///
xlab(-1(1)3) ///
xscale ( line noextend) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
legend (region(lcolor(white))  pos (10) col(1) size(medlarge) ) ///
xsize(12) ysize(9) ///
name(figure1, replace)


**Figure 2

reg dv_intend6 t_negframe if female ==0
estimates store a
reg dv_intend6 t_negframe if female == 1
estimates store b
reg dv_intend6 t_negframe if white ==1
estimates store c
reg dv_intend6 t_negframe if white ==0
estimates store d
reg dv_intend6 t_negframe if cons3 ==3
estimates store e
reg dv_intend6 t_negframe if cons3 ==1
estimates store f
reg dv_intend6 t_negframe if age > 32
estimates store g
reg dv_intend6 t_negframe if age <= 32
estimates store h
reg dv_intend6 t_negframe if republican3==1
estimates store i
reg dv_intend6 t_negframe if republican3==3
estimates store j

coefplot ///
 (g, label ("Older, N=387") msymbol(square) msize(vlarge) color(orange) ciopts(recast(rcap) color(orange)) ) ///
 (h, label ("Younger, N=396") msymbol(square) msize(vlarge) mfcolor(white) color(orange) ciopts(recast(rcap) color(orange)) ) /// 
 ( a, label ("Male, N=328") msymbol(square) msize(vlarge) color(forest_green) ciopts(recast(rcap) color(forest_green)) ) ///
 (b, label ("Female, N=165") msymbol(square) msize(vlarge) mfcolor(white) color(forest_green) ciopts(recast(rcap) color(forest_green)) ) ///
 (c, label ("White, N=163") msymbol(square) msize(vlarge) color(black) ciopts(recast(rcap) color(black)) ) ///
 (d, label ("Not White, N=143") msymbol(square) msize(vlarge) mfcolor(white) color(black) ciopts(recast(rcap) color(black)) ) ///
   (j, label ("Republican, N=217") msymbol(square) msize(vlarge) color(maroon*1.2) ciopts(recast(rcap) color(maroon*1.2)) ) ///
 (i, label ("Democrat, N=358") msymbol(square) msize(vlarge) mfcolor(white) color(maroon*1.2) ciopts(recast(rcap) color(maroon*1.2)) ) ///
 (e, label ("Conservative, N=202") msymbol(square) msize(vlarge) color(cranberry) ciopts(recast(rcap) color(cranberry)) ) ///
 (f, label ("Liberal, N=440") msymbol(square) msize(vlarge) mfcolor(white) color(cranberry) ciopts(recast(rcap) color(cranberry)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
ylab( , labsize(medlarge) ) yscale(off) ///
xtitle( "Effect on Intentionality Evaluation", size (large) margin(medlarge)) ///
xlab(-1(1)3) ///
xscale ( line noextend) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
legend (region(lcolor(white))  pos (11) col(2) size(medlarge) ) xsize(10) ysize(16) ///
name(figure1, replace)




*********************************Replication for Appendix

clear
use S1_college_stata12.dta


**Table A1 "Manipulation Check Results"
tab pass_check
tab pass_check t_negframe, col
tab pass_check t_unesco, col // Scenario is CIvilian when t_unesco ==0


**Figure A1 "Actions with Negative Consequences Cause Greater Attribution of Intentionality"

reg dv_intend6 t_negframe
estimates store a
reg dv_intend6 t_negframe if t_unesco ==0
estimates store b
reg dv_intend6 t_negframe if t_unesco == 1
estimates store c

coefplot ///
 (a, label ("All, N=328") msymbol(square) msize(large) color(gold) ciopts(recast(rcap) color(gold)) ) ///
 (b, label ("Civilian Issue, N=165") msymbol(square) msize(large) color(green) ciopts(recast(rcap) color(green)) ) ///
 (c, label ("UNESCO Issue, N=163") msymbol(square) msize(large) color(gray) ciopts(recast(rcap) color(gray)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
ylab( , labsize(medlarge) ) yscale(off) ///
xtitle( "Effect on Intentionality Evaluation", size (medlarge) margin(medlarge)) ///
xlab(-1(1)3) ///
xscale ( line noextend) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
legend (region(lcolor(white))  pos (11) col(1) size(medlarge) ) xsize(10) ysize(12) ///
name (figureA1, replace)



clear

use S2_mturk_stata12.dta

**Table A2 "Distribution of the Dependent Variable, %"
tab dv_intend6 t_negframe, col

**Figure A2 "Negative Consequences Affect Morality Evaluations"

reg dv_immoral6 t_negframe
estimates store a
reg dv_immoral6 t_negframe if t_unesco ==0 & t_severity == 0
estimates store b
reg dv_immoral6 t_negframe if t_unesco ==0 & t_severity == 1
estimates store c
reg dv_immoral6 t_negframe if t_unesco ==1 & t_severity == 0
estimates store d
reg dv_immoral6 t_negframe if t_unesco == 1 & t_severity == 1
estimates store e

coefplot ///
 (a, label ("All Scenarios, N=783") msymbol(square) msize(large) color(black) ciopts(recast(rcap) color(black)) ) ///
 (b, label ("Civilian-Low, N=194") msymbol(square) msize(large) mfcolor(white) color(cranberry) ciopts(recast(rcap) color(cranberry)) ) ///
 (c, label ("Civilian-High, N=193") msymbol(square) msize(large)  color(cranberry) ciopts(recast(rcap) color(cranberry)) ) ///
 (d, label ("UNESCO-Low, N=194") msymbol(square) msize(large) mfcolor(white) color(navy) ciopts(recast(rcap) color(navy)) ) ///
 (e, label ("UNESCO-High, N=202") msymbol(square) msize(large) color(navy) ciopts(recast(rcap) color(navy)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
ylab( , labsize(medlarge) ) yscale(off) ///
xtitle( "Effect on Immorality Evaluation", size (medlarge) margin(medlarge)) ///
xlab(-1(1)3) ///
xscale ( line noextend) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
legend (region(lcolor(white))  pos (10) col(1) size(medium) ) ///
xsize(12) ysize(9) ///
name(figureA2, replace)


**Figure A3 "Respondents who believed that the act was immoral were more likely to believe that the act was intentional"

twoway (scatter dv_intend6 dv_moral6, jitter(5) msymbol(square_hollow) ) ///
(lfit dv_intend6 dv_immoral6, lcolor(cranberry) lwidth(thick)) ///
, ///
yscale(noextend) ylabel(1(1)6, angle(horizontal) nogmin nogmax grid nogextend glcolor(gray*0.3) glwidth(vthin) ) ///
xscale(noextend) xlabel(1(1)6) ///
xtitle("Immoral", size (medlarge) margin(medsmall)) ///
ytitle("Intentional", size(medlarge) margin(medsmall) ) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
legend ( position(11) region( lcolor(white)) col(1) order(2 "Best Fit Line" ) ) xsize(10) ysize(8) ///
name(figureA3, replace)


**Tables A3 and A4: sample attributes and balance tests

clear
use S1_college_stata12.dta

*Survey #1: Sample
tab female
summ age, detail
tab white
tab republican

*Survey #1: balance
reg age t_negframe
reg female t_negframe
reg conservative7 t_negframe
reg white t_negframe
reg republican3 t_negframe


clear
use S2_mturk_stata12.dta

*Survey #2: Sample
tab female
summ age, detail
tab white
tab republican3

*Survey #2: balance
reg age t_negframe
reg female t_negframe
reg conservative7 t_negframe
reg white t_negframe
reg republican3 t_negframe
reg education6 t_negframe


log close
